package com.test.map;


import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.TextView;
import android.widget.Toast;

import com.test.map.sign.BaseActivity;
import com.test.map.sign.DateBaseHelper;

public class Login extends BaseActivity {
    private DateBaseHelper hp;
    private TextView textView;

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.main,menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        switch (item.getItemId()) {
            case R.id.device:
                Toast.makeText(Login.this,"设备设置",Toast.LENGTH_SHORT).show();

            case R.id.quit:
                Intent aa=getIntent();
                String data=aa.getStringExtra("ex");
                Intent intent=new Intent("com.example.office");
                intent.putExtra("t",data);
                sendBroadcast(intent);//点击按钮会强制退出，并利用intent传递数据
            case R.id.connect:

        }
        return super.onOptionsItemSelected(item);
    }
    protected void onCreate(Bundle savedInstanceState) {
        Intent intent=getIntent();
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_login);

       // textView=(TextView)findViewById(R.id.text_1) ;
      //  textView.setText("Hi,"+intent.getStringExtra("ex"));//显示你的名字出来



    }


}